package com.yiyuan.app.entity.enums;

/**
 * @Author: sunxuzong
 * @Date: 2024/07/19
 */
public enum AppTypeEnum {
    android("android","安卓"),
    ios("ios","苹果")
    ;

    private String code;

    private String desc;

    AppTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static AppTypeEnum getByCode(String code){
        for (AppTypeEnum enums : AppTypeEnum.values()){
            if (enums.getCode().equals(code)){
                return enums;
            }
        }
        return  null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
